home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / mrcry204.zip / ELLIPSE.EKA < prev    next >
Text File  |  1991-03-04  |  522b  |  23 lines

  1. ; This problem is to find the minimum distance from a plane to an ellipsoid.
  2. ; Mercury takes a long time on this.
  3.  
  4. MINIMIZE  F
  5.  x^2 + 2 y^2 + 3 z^2 = 20               ; ellipsoid
  6.  3 u + 4 v + 3 w = 54                 ; plane
  7.  F = (x - u)^2 + (y - v)^2 + (z - w)^2      ; square of distance
  8.  
  9. ; exact solution is:  x = 3 , y = 2 , z = 1
  10. ;                     u = 6 , v = 6 , w = 4
  11. ;                     F = 34
  12.  
  13. { starting values }
  14.  x := 0
  15.  y := 0
  16.  z := 0
  17.  u := 8
  18.  v := 8
  19.  w := 8
  20.  
  21.  DIGITS 6
  22.  PROGRESS x
  23.